<template>
  <section>
    <main>
      <div class="pink">教师应聘</div>
    <div class="model">
      <div class="body">
        <div class="header"><span class="title">基本信息</span></div>
        <div class="content">
          <div class="left bigger">
            <span>真实姓名</span>
            <input type="text" class="text" v-model="name">
          </div>
          <div class="left bigger">
            <span>联系方式</span>
            <input type="text" class="text" v-model="phone">
          </div>
          <div class="left bigger">
            <span>身份证号</span>
            <input type="text" class="text" v-model="idNo">
          </div>
          <div class="left">
            <span>应聘岗位</span>
            <input type="text" class="text" v-model="position">
          </div>
          <div class="right">
            <span>教龄</span>
            <input type="text" class="text" v-model="schoolAge">
          </div>
          <div class="left">
            <span>教师资格证</span>
            <input type="text" class="text" v-model="teacherCertification">
          </div>
          <div class="right">
            <span>职称</span>
            <input type="text" class="text" v-model="titles">
          </div>
          <div class="left">
            <span>学历</span>
            <input type="text" class="text" v-model="education">
          </div>
          <div class="right">
            <span>专业</span>
            <input type="text" class="text" v-model="major">
          </div>
          <div class="left bigger">
            <span>毕业院校</span>
            <input type="text" class="text" v-model="university">
          </div>
          <div class="left bigger">
            <span>现工作单位</span>
            <input type="text" class="text" v-model="nowCompany">
          </div>
          <div class="bottom">
            <span>获奖奖项</span>
            <el-input type="textarea" v-model="prizes"></el-input>
          </div>
          <div class="bottom">
            <span>工作特长</span>
            <el-input type="textarea" v-model="workFeatures"></el-input>
          </div>
          <!-- <div class="bottom">
            <span>故障描述</span>
            <el-form-item label="通知内容">
              <el-input type="textarea" v-model="form.situation"></el-input>
            </el-form-item>
          </div> -->
          <div class="address_list"></div>
          <div class="scent_btn">
            <button class="btn btn-danger" @click="subAll">提交</button>
          </div>
        </div>
      </div>
    </div>
    </main>
  </section>
</template>

<script>
export default {
  data () {
    return {
      name: null,
      phone: null,
      idNo: null,
      position: null,
      schoolAge: null,
      teacherCertification: null,
      titles: null,
      education: null,
      university: null,
      major: null,
      nowCompany: null,
      prizes: null,
      workFeatures: null,
      form: {},
      dialogImageUrl: null,
      dialogVisible: false
    }
  },
  methods: {
    subAll () {
      if (this.radio === '1') {
        this.studentSex = '男'
      } else if (this.radio === '2') {
        this.studentSex = '女'
      }
      this.xtoken = {'yxt-xtoken': localStorage.xtoken}
      this.$http.post(this._httpUrl + 'signup/teacherMsg/add', {
        name: this.name,
        phone: this.phone,
        idNo: this.idNo,
        position: this.position,
        schoolAge: this.schoolAge,
        teacherCertification: this.teacherCertification,
        titles: this.titles,
        education: this.education,
        university: this.university,
        major: this.major,
        nowCompany: this.nowCompany,
        prizes: this.prizes,
        workFeatures: this.workFeatures
      }, {'headers': {'yxt-xtoken': localStorage.xtoken}}).then(function (response) {
        if (response.body.code === '000') {
          console.log(this.studentSex)
        } else if (response.body.code === '887') {
          this.$router.push('/')
        } else if (response.body.code === '889') {
          this.$router.push('/')
        }
      })
    }
  }
}
</script>

<style scoped>
  .el-textarea__inner
  {
    position: relative; left: 9%; top: -32px;
    width: 80%;
  }
  .scent_btn
  {
    position: relative;
    height: 80px;
  }
  .scent_btn button
  {
    position: absolute; left: 38%; top: 20px;
  }
</style>
<style lang="less" scoped>
@import '/static/css/material-dashboard.css';
main
{
  position: relative;
  .pink{
      width: 104px;
      height: 64px;
      position: absolute;
      left: 3%;
      top: -20px;
      background: #E12C6C;
      border-radius: 4px;
      text-align: center;
      line-height: 70px;
      color: #fff;
      z-index: 2;
    }
  .model{
    width: 98%;
    background: #FFF;
    margin-left: 1%;
    margin-top: 60px;
    border-radius: 5px;
    padding-top: 10px;
    overflow: hidden;
    .header{
      width: 98%; height: 22px;
      border-bottom: 1px solid #ccc;
      padding: 30px 0 10px 0;
      margin-left: 0%;
      margin-bottom: 10px;
      .title{
        color: #FB7862;
        border-bottom: 2px solid #FB7862;
        padding: 0 13px 7px 0;
        margin-left: 0;
      }
    }
    .body{
      padding: 40px 0 10px 11%;
      span{
        margin-left: 4%;
        display: inline-block;
        width: 80px;
        text-align: right;
      }
      span:first-child{
        margin-left: 0;
      }
      .content{
        width: 100%;
        div[data-v-ecd77154]
        {
          line-height: 50px;
        }
        .left{
          width: 30%;
          display: inline-block;
          padding: 10px 0;
        }
        .bigger
        {
          width: 100%;
        }
        .right{
          width: 30%;
          display: inline-block;
          padding: 10px 0;
          margin-left: 28%;
        }
        .bottom{
          padding: 10px 0;
          .text{
            width: 68%;
          }
        }
        .text{
          border: 0;
          border-bottom: 1px solid #D7D7D7;
        }
      }
    }
  }
}
</style>
